#pragma once

#include "IXFrame.h"

class ExportXSkinLib IXWindow : public IXFrame
{
    DEF_INTERFACE(IXWindow, _T("{0E095DAE-CF23-40da-A4EC-F049AB013E14}"));
public:
    virtual ~IXWindow(){};

    virtual XWND    STDMETHODCALLTYPE   GetHandle() = 0;

    virtual void    STDMETHODCALLTYPE   SetCornerSize(int nSize) = 0;

    virtual DWORD   STDMETHODCALLTYPE   DoModal(XWND xParentWnd, RECT* prcWnd) = 0;
    virtual void    STDMETHODCALLTYPE   CancelModal(DWORD dwResult) = 0;
    virtual void    STDMETHODCALLTYPE   Destroy() = 0;

    virtual DWORD   STDMETHODCALLTYPE   GetStyle() = 0;
    virtual void    STDMETHODCALLTYPE   ModifyStyle(DWORD dwAddStyle, DWORD dwRemoveStyle) = 0;

    virtual DWORD   STDMETHODCALLTYPE   GetExtendStyle() = 0;
    virtual void    STDMETHODCALLTYPE   ModifyExtendStyle(DWORD dwAddExStyle, DWORD dwRemoveExStyle) = 0;

    virtual void    STDMETHODCALLTYPE   put_Icon(IN XICON icon, IN BOOL bBig) = 0;
    virtual void    STDMETHODCALLTYPE   get_Icon(OUT XICON* pIcon, IN BOOL bBig) = 0;

    virtual DWORD   STDMETHODCALLTYPE   get_HitTestCode() = 0;
    virtual void    STDMETHODCALLTYPE   put_HitTestCode(DWORD dwHitTestCode) = 0;
};

#define WndEvent_Created    _T("EvtCreated")
#define WndEvent_Destroy    _T("EvtDestroy")

#define WndEvent_Minimized  _T("EvtMinimized")
#define WndEvent_Maximized  _T("EvtMaximized")


// User choose to close the window
// lParam: BOOL*, Set *lParam = FALSE if you don't want the windows closed.
#define WndEvent_QueryClose _T("EvtQueryClose")

// LPARAM: NonZero if the window is activated.
#define WndEvent_Activate   _T("EvtActivate")